package com.bwsoft.admin.service;

import java.io.File;
import java.util.List;

import com.bwsoft.admin.domain.Account;
import com.bwsoft.admin.domain.NewsCategory;
import com.bwsoft.admin.domain.QualityControl;
import com.bwsoft.admin.domain.QualityControlJoiner;
import com.bwsoft.admin.domain.valueObject.QualityControlJoinerVO;
import com.bwsoft.admin.domain.valueObject.QualityControlVO;
import com.bwsoft.model.Message;


public interface QualityControlService {
	public static final String NAME = "QualityControlServiceImpl";
	
	/**
	 * 分页查询质量控制
	 * @return 质量控制的集合
	 */
	List<QualityControl> findData(Integer page, Integer rows, String s_qcId, String s_projectName, String s_sponsor, String s_status, String s_openFlag, String s_ptclsj, String s_ptxz);
	
	/**
	 * 查询质量控制信息总数
	 * @return
	 */
	Long getTotalCount(String s_qcId, String s_projectName, String s_sponsor, String s_status, String s_openFlag, String s_ptclsj, String s_ptxz);
	
	/**
	 * 根据ID查询出要修改项的所有数据
	 * @return
	 */
	QualityControl findDataByID(int id);
	
	/**
	 * 跟据AccountId查出实验室的所需所有信息
	 * @param AccountId
	 * @return
	 */
	Account findSponsorDataByID(int id);
	
	/**
	 * 保存更改后的状态
	 * @param qualityControl
	 * @return
	 */
	Message closeQualityControl(QualityControl qualityControl);
	
	/**
	 * 改成开启状态
	 * @param qualityControl
	 * @return
	 */
	Message openQualityControl(QualityControl qualityControl);
	
	/**
	 * 删除
	 * @param qualityControl
	 * @return
	 */
	Message remove(QualityControl qualityControl);
	
	/**
	 * 修改
	 * @param qualityControl
	 * @return
	 */
	 Message editQualityControl(QualityControl qualityControl);
	 
	 
	 /**
	  * 分页 参与人详细信息
	 * @param page
	 * @param rows
	 * @param qcId
	 * @return
	 */
	List<QualityControlJoiner> findJoinersData(Integer page, Integer rows, int qcId);
	 
	 /**
	  * 参与人总数
	 * @param id
	 * @return
	 */
	int getJoinersTotalCount(int id);
	
	
	/**
	 * 上传报告
	 * @param qualityControl
	 * @return
	 */
	Message updateFile(QualityControl qualityControl, File file, String fileName);
	
	/**
	 * 获取Vo
	 * 
	 * @param qcs
	 * @return
	 */
	List<QualityControlVO> getVo(List<QualityControl> qcs);
	
	/**
	 * 获取JoinerVo
	 * 
	 * @param qcjs
	 * @return
	 */
	List<QualityControlJoinerVO> getJoinerVo(List<QualityControlJoiner> qcjs);
}
